home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 1⁄12⁄90 / 0034-Re[2] What Gives Her-Jan90 next >
Encoding:
Text File  |  1990-01-12  |  1.8 KB  |  50 lines  |  [TEXT/GEOL]

  1. Item    3828388                         8-Jan-90        23:08
  2.  
  3. From:   D3632                           Cadence Design, Ken Friedenbach,PRT
  4.  
  5. To:     SCHMUCKER1                      Schmucker, Kurt
  6.         D2022                           Strata, Gary Bringhurst,PRT
  7.  
  8. cc:     NASSI                           Nassi, Ike
  9.         CPLUS.APPLE$                    C++ Interest List--Apple Employees
  10.         CPLUS.DEV$                      C++ Interest List--Developers
  11.  
  12. Sub:    Re- Re- What Gives Here?
  13.  
  14. Item    8646736                         18-Dec-89        05:25
  15.  
  16. From:   SCHMUCKER1                      Schmucker, Kurt
  17.  
  18. To:     D2022                           Strata, Gary Bringhurst,PRT
  19.  
  20. cc:     CPLUS.APPLE$                    C++ Interest List--Apple Employees
  21.         CPLUS.DEV$                      C++ Interest List--Developers
  22.         NASSI                           Nassi, Ike
  23.  
  24. Sub:    Re: What gives here?
  25.  
  26. Gary,
  27.  
  28.     This is what I believe is happening in your code (but I am still a C++
  29. novice):
  30.  
  31.     There are two "overs" in your code: overriding and overloading.  Bjarne
  32. made the decision that overriding is stronger than overloading, hence
  33. overriding a foo method in a derived class hides ALL foos in any ancestor
  34. classes, regardless of their parameter lists.  Apparently, (as your example
  35. shows), if you override all the foos, then it works out correctly.
  36.  
  37.     Don't you just love it when a language has fun, little quirky interactions
  38. like this between features?
  39.  
  40.     I also found this principle of "overriding is stronger than overloading"
  41. puzzling and in the current working draft definition of the next version of
  42. Object Pascal, we have these two concepts orthogonal, and thus, overriding
  43. foo(int) does not hide foo(real) or foo(string).
  44.  
  45.  
  46. Kurt Schmucker
  47. Apple Computer
  48.  
  49.  
  50.